Skip to content

chore: spring cleaning — Go matrix, pgx, testify, golangci-lint#79

Merged
obitech merged 7 commits into
mainfrom
aknipping/obitech-spring-cleaning-2026
May 21, 2026
Merged

chore: spring cleaning — Go matrix, pgx, testify, golangci-lint#79
obitech merged 7 commits into
mainfrom
aknipping/obitech-spring-cleaning-2026

Conversation

@obitech
Copy link
Copy Markdown
Member

@obitech obitech commented May 12, 2026

Maintenance batch, no public API or behavior changes.

  • CI: extend Go matrix to 1.22–1.26, add a golangci-lint step.
  • Deps: bump jackc/pgx/v5; promote stretchr/testify to direct.
  • Tests: switch assertions to testify/assert + testify/require.
  • Lint: replace archived golint with golangci-lint run in the Makefile; fix one staticcheck SA1029 (typed context key in tests).

obitech added 5 commits May 12, 2026 08:12
The golang.org/x/lint/golint tool was archived in 2020. Replace the
Makefile's `lint` target with `golangci-lint run ./...` and drop the
now-unused `deps` target that installed the archived binary. CI gains
a `golangci-lint` step using golangci/golangci-lint-action@v9 so the
same check runs in pull requests.
Define an unexported spanNameCtxKey struct in
TestTracer_sqlOperationNameFromCtx instead of using a bare string
as the context.WithValue key. Mirrors the startTimeCtxKey{} pattern
already used in tracer.go and silences staticcheck SA1029.
Comment thread .github/workflows/test.yaml Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Maintenance-focused update that modernizes CI/linting and refreshes dependencies while migrating tests to testify assertions.

Changes:

  • Updated dependencies (notably pgx/v5) and promoted stretchr/testify to a direct dependency.
  • Replaced t.Errorf/b.Fatal patterns with testify/assert and testify/require in tests/benchmarks, and fixed typed context key usage in tests.
  • Switched linting from archived golint to golangci-lint, and added a lint step to CI with an expanded Go version matrix.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tracer_test.go Migrates assertions to testify/assert and fixes context key typing in tests.
tracer_benchmark_test.go Uses testify/require for benchmark setup/transaction error handling.
Makefile Replaces golint with golangci-lint run and removes the old deps target.
go.mod Bumps pgx/v5 and adds testify as a direct dependency; refreshes indirect deps.
go.sum Updates checksums to match the dependency changes.
.gitignore Ignores .claude/* artifacts.
.github/workflows/test.yaml Expands Go matrix and adds a golangci-lint step.
Comments suppressed due to low confidence (1)

.github/workflows/test.yaml:28

  • actions/checkout@v3 and actions/setup-go@v3 are very old and have been subject to GitHub Actions runtime deprecations (Node 16). Consider upgrading to actions/checkout@v4 and actions/setup-go@v5 to avoid workflow breakage on GitHub-hosted runners.
      - uses: actions/checkout@v3

      - name: Setup Go
        uses: actions/setup-go@v3
        with:
          go-version: ${{ matrix.go-version }}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test.yaml Outdated
obitech and others added 2 commits May 21, 2026 10:23
Stick to latest +2

Co-authored-by: Leo Antunes <leo@costela.net>
@obitech obitech merged commit 25501de into main May 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants